<template>
  <div class="margin-top">
    <ImagePreview :src="rowObj.equipmentBaseVo.image" :width="120" :height="120"></ImagePreview>
    <el-scrollbar style="height:300px;">
      <el-descriptions border :column="5" size="medium">
        <template slot="extra">
          <el-link :disabled="!(rowObj.equipmentBaseVo && rowObj.equipmentBaseVo.file)" type="primary"
            icon="el-icon-document" :href="rowObj.equipmentBaseVo && rowObj.equipmentBaseVo.file" target="_blank">附件资料
          </el-link>
        </template>
        <el-descriptions-item label="设备编号">{{ rowObj.equipmentNum || '-' }}</el-descriptions-item>
        <el-descriptions-item label="资产编号">{{ rowObj.assetNum || '-' }}</el-descriptions-item>
        <el-descriptions-item label="设备名称">{{ rowObj.equipmentBaseVo.equipmentName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="品牌">{{ rowObj.equipmentBaseVo.brand || '-' }}</el-descriptions-item>
        <el-descriptions-item label="规格型号">{{ rowObj.equipmentBaseVo.model || '-' }}</el-descriptions-item>
        <el-descriptions-item label="单位">{{ rowObj.equipmentBaseVo.unitName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="供应商">{{ rowObj.supplierName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="类别">{{ rowObj.equipmentBaseVo.typeName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="计量设备">{{ meterageFlag[rowObj.equipmentBaseVo.meterageFlag] || '-' }}
        </el-descriptions-item>
        <el-descriptions-item label="计量编号">{{ rowObj.equipmentBaseVo.meterageNum || '-' }}</el-descriptions-item>
        <el-descriptions-item label="所属部门">{{ rowObj.deptName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="负责人">{{ rowObj.headName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="放置位置" :span="3">{{ rowObj.placeName || '-' }}</el-descriptions-item>

        <el-descriptions-item label="采购日期">{{ rowObj.purchaseTime || '-' }}</el-descriptions-item>
        <el-descriptions-item label="验收日期">{{ rowObj.acceptanceTime || '-' }}</el-descriptions-item>
        <el-descriptions-item label="启用日期">{{ rowObj.enableTime || '-' }}</el-descriptions-item>
        <el-descriptions-item label="保质期至">{{ rowObj.shelfLife || '-' }}</el-descriptions-item>
        <el-descriptions-item label="预计报废日期">{{ rowObj.estimatedScrapTime || '-' }}</el-descriptions-item>

        <el-descriptions-item label="采购金额">{{ rowObj.purchasePrice === null ? '****' : rowObj.purchasePrice }}
        </el-descriptions-item>
        <el-descriptions-item label="设备状态">
          <dict-tag :options="statusDevicedist" :value="rowObj.status" />
        </el-descriptions-item>
        <el-descriptions-item label="使用状态">{{ rowObj.userStatusName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="净值(元)">{{ rowObj.netWorth === null ? '****' : rowObj.netWorth }}
        </el-descriptions-item>
        <el-descriptions-item label="备注" :span="5">{{ rowObj.remark || '-' }}</el-descriptions-item>
      </el-descriptions>
    </el-scrollbar>
    <!-- <br>
    <ImagePreview :src="rowObj.equipmentBaseVo.image" :width="220" :height="220"></ImagePreview> -->
    <!-- <el-image style="width:120px;height:120px" :src="rowObj.equipmentBaseVo.image"></el-image> -->
  </div>
</template>

<script>
export default {
  name: 'contens',
  props: ['rowObj'],
  data () {
    return {

    }
  },
  created () {
  },
}
</script>

<style less="scss" scoped>
::v-deep.margin-top .el-scrollbar__wrap {
  overflow-x: hidden !important;
}

/* .margin-top {
  overflow: scroll;
  overflow-y: auto;
  overflow-x: auto;
} */
</style>